package com.jintoufs.dao.customer;


import com.jintoufs.domain.customer.CustomerRole;
import com.jintoufs.domain.role.Role;
import com.jintoufs.domain.role.query.RoleQuery;

import java.util.List;
import java.util.Map;

public interface CustomerRoleMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(CustomerRole record);

    int insertSelective(CustomerRole record);

    CustomerRole selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(CustomerRole record);

    boolean updateByPrimaryKey(CustomerRole record);

    /**
     * 根据条件查询
     *
     * @param params
     * @return
     */
    List<CustomerRole> getByFilter(Map<String, Object> params);

    /*
     * 查找角色描述小与给定值的角色
     * 主要是用来加载当前用户可创建的用户角色
     * */
    List<CustomerRole> getSubRoles(String roleDesc);


    Long queryCountByCondtion(RoleQuery queryObject);

    List<Role> queryByCondtion(RoleQuery queryObject);

}